package com.atguigu.admin.service;

import com.atguigu.admin.model.dto.RegisterDto;
import com.atguigu.admin.model.entity.SysUser;
import com.atguigu.admin.model.vo.SysUserQueryVo;
import com.atguigu.system.model.entity.dto.UpPasswordDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author atguigu
 * @since 2022-10-28
 */
public interface SysUserService extends IService<SysUser> {

    /**
     * 根据用户名获取用户关联信息
     *
     * @param username
     * @return
     */
    Map<String, Object> getUserInfo(String username);

    /**
     * 根据用户名获取用户对象
     *
     * @param username
     * @return
     */
    SysUser getUserInfoByUserName(String username);

    /**
     * 分页查询
     *
     * @param pageParam
     * @param userQueryVo
     * @return
     */
    IPage<SysUser> selectPage(Page<SysUser> pageParam, SysUserQueryVo userQueryVo);

    /**
     * 根据id，更新状态
     * @param id
     * @param status
     */
    void updateStatus(Long id, Integer status);

    Boolean  register(RegisterDto registerDto);

    Map<String, Object> getBaseUserInfo(String username);

    boolean resetPassword(UpPasswordDto upPasswordDto, String userName );
}
